package com.china08.yxyapi.entity.mg.homework;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * 作业系统: 发布的作业
 * 
 * @author Richard Wang
 *
 */
@Document(collection = "yxy.tea.homework.task")
public class HomeworkTask extends MongoBaseEntityNoId {

    private static final long serialVersionUID = -3872610602748308679L;

    /** 主键 */
    @Id
    private String id;

    /** 标题 */
    @Field(value = "title")
    private String title;

    /**
     * 试题类标题
     */
    @Field(value = "sub_title")
    private String subTitle;

    /** 学校:ID */
    @Indexed
    @Field(value = "school_id")
    private String schoolId;

    /** 学段 */
    @Indexed
    @Field(value = "stage")
    private String stage;

    /** 学科 */
    @Field(value = "subject")
    private String subject;

    /** 学科名称 */
    @Field(value = "subject_name")
    private String subjectName;

    /** 知识点:ID列表 */
    @Indexed
    @Field(value = "know_ids")
    private List<Integer> knowIds = new ArrayList<Integer>();

    /** 知识点:名称列表 */
    @Field(value = "know_names")
    private List<String> knowNames = new ArrayList<String>();

    /** 发布时间 */
    @Field(value = "publish_date")
    private Date publishDate;

    /** 发布答案解析：0--提交作业后，1--截止时间后 */
    @Field(value = "publish_answer")
    private Integer publishAnswer;

    /**
     * 本任务截止完成时间，此时间之后就不能答题
     */
    @Field(value = "predict_date")
    private Date predictDate;

    /** 发布用户:ID */
    @Indexed
    @Field(value = "publish_user_id")
    private String publishUserId;

    /** 发布用户名称 */
    @Field(value = "publish_user_nick")
    private String publishUserNick;

    /** 班级 */
    @Field(value = "class_ids")
    private List<String> classIds = new ArrayList<String>();

    /**
     * 试题类型 0：试题类作业，1：通知类作业 2：阅读类作业。</br>
     * 2017.08.23 将2更改为"阅读类作业", 如果本次发布的作业为多类型的, 使用拼接的方式</br>
     * 例如: 012代表"试题,通知,阅读"; 02代表"试题,阅读"
     */
    @Field(value = "task_type")
    private String taskType;

    /**
     * 通知类作业是否需要学生在线提交true需要,false不需要
     */
    @Field(value = "if_need_sumbit")
    private Boolean ifNeedSumbit;

    /**
     * 作业发布的来源 0--作业系统 1--备授课系统
     */
    @Field(value = "source")
    private Integer source;

    /**
     * 备授课类型: 0--预习作业 1--课后作业</br>
     * 2017.08.25 王慧超 </br>
     * 作业加预习作业和课后作业字段 </br>
     * 预习作业：备授课发送的标记为预习作业的作业 </br>
     * 课后作业：作业系统布置的以及备授课发送的标记为课后作业的作业
     * 
     */
    @Field(value = "lecture_type")
    private Integer lectureType;

    public Boolean getIfNeedSumbit() {
        return ifNeedSumbit;
    }

    public void setIfNeedSumbit(Boolean ifNeedSumbit) {
        this.ifNeedSumbit = ifNeedSumbit;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public List<Integer> getKnowIds() {
        return knowIds;
    }

    public void setKnowIds(List<Integer> knowIds) {
        this.knowIds = knowIds;
    }

    public List<String> getKnowNames() {
        return knowNames;
    }

    public void setKnowNames(List<String> knowNames) {
        this.knowNames = knowNames;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public Integer getPublishAnswer() {
        return publishAnswer;
    }

    public void setPublishAnswer(Integer publishAnswer) {
        this.publishAnswer = publishAnswer;
    }

    public Date getPredictDate() {
        return predictDate;
    }

    public void setPredictDate(Date predictDate) {
        this.predictDate = predictDate;
    }

    public String getPublishUserId() {
        return publishUserId;
    }

    public void setPublishUserId(String publishUserId) {
        this.publishUserId = publishUserId;
    }

    public List<String> getClassIds() {
        return classIds;
    }

    public void setClassIds(List<String> classIds) {
        this.classIds = classIds;
    }

    public String getPublishUserNick() {
        return publishUserNick;
    }

    public void setPublishUserNick(String publishUserNick) {
        this.publishUserNick = publishUserNick;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getTaskType() {
        return taskType;
    }

    public void setTaskType(String taskType) {
        this.taskType = taskType;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public Integer getLectureType() {
        return lectureType;
    }

    public void setLectureType(Integer lectureType) {
        this.lectureType = lectureType;
    }

}
